﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NLBS.Data.Interface;
using NLBS.Entity;
namespace NLBS.Data.SqlDataService
{
    class TrackBackService:ITrackBackService
    {
        private DbProvider db
        {
            get
            {
                return DbProvider.Instance();
            }
        }

        #region ITrackBackService Members

        public IList<TrackBack> GetTrackBack()
        {
            return db.GetTrackBack();
        }

        public IPagedCollection<TrackBack> GetTrackBackBySearch(int startIndex, int pageSize, string prefix)
        {
            return db.GetTrackBackBySearch(startIndex, pageSize, prefix);
        }

        public void InsertTrackBack(TrackBack tb)
        {
            db.InsertTrackBack(tb);
        }

        public TrackBack GetTrackBackByID(int id)
        {
            return db.GetTrackBackByID(id);
        }

        public TrackBack GetTrackBackByName(string title, string excerpt)
        {
            return db.GetTrackBackByName(title, excerpt);
        }

        public void UpdateTrackBack(TrackBack tb)
        {
            db.UpdateTrackBack(tb);
        }

        public void DeleteTrackBack(int id)
        {
            db.DeleteTrackBack(id);
        }

        #endregion
    }
}
